package com.jmb.apiplatform.controller;


import com.jmb.apiplatform.common.PageResult;
import com.jmb.apiplatform.common.Result;
import com.jmb.apiplatform.pojo.UserLogVO;
import com.jmb.apiplatform.pojo.UserLoginLogDao;
import com.jmb.apiplatform.service.UserLoginLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Tag(name = "登录日志")
@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    private UserLoginLogService userLoginLogService;


    @Operation(summary = "登录日志列表")
    @GetMapping("/log")
    public Result loginLog(UserLogVO userLogVO){
        PageResult<UserLoginLogDao> list = userLoginLogService.list(userLogVO);
        return Result.success(list);
    }

}
